package main

import (
	"faker/project-public/core"
	"faker/project-public/global"
	"faker/project-public/initialize"
	_ "github.com/go-sql-driver/mysql"
	"go.uber.org/zap"
)

func main() {
	//初始化配置文件yml
	global.FAKER_VIPER = core.Viper()
	//初始化日志
	global.FAKER_LOG = core.Zap()
	zap.ReplaceGlobals(global.FAKER_LOG) //将 zap 的日志记录器设置为全局默认值
	//初始化数据库
	global.FAKER_DB = initialize.GormMysql()
	//运行
	core.RunServer()
}
